package tree

import "fmt"

/*定义一个treeNode结构*/
type Node struct {
	Value       int
	Left, Right *Node
}
/*给treeNode定义方法*/
func (node Node) Print(){
	fmt.Println(node.Value)
}
/*遍历树*/
func (node *Node) Trvasever(){
	if nil == node {
		return
	}
	node.Left.Trvasever()
	node.Print()
	node.Right.Trvasever()
}
func (node *Node) SetValue(value int){
	node.Value = value
}







